package ch.zhaw.cctd.domain.prototype;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * Representiert ein CreepTyp und dessen Einstellungen im XML Config File
 * @author Rolf Koch
 * @author Benjamin Felder
 */
public class CreepPrototype extends Prototype implements Serializable {
	
	private static final long serialVersionUID = -2118674666648532208L;

	public CreepPrototype(Map<String,String> data) {
		super(data);
	}
	
	public String getTitle() {
		return this.getValue("title");
	}
	
	public String getImagePath() {
		return this.getValue("image.path");
	}
	
	public int getLife() {
		return this.getIntegerValueWith0("life.#text");
	}
	
	public int getSpeed() {
		return this.getIntegerValueWith0("speed.#text");
	}

	public List<String> getAbilities() {
		return this.getListValue("abilities.ability.name");
	}

	public int getMoney() {
		return this.getIntegerValueWith0("money.#text");
	}

	public int getSize() {
		return this.getIntegerValueWith0("size.#text");
	}
}
